package com.turkcell.dv.rest;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.eolcum.evo.bo.Sensor;
import com.eolcum.evocenter.ActionBuffer;
import com.google.gson.Gson;
import com.turkcell.dv.dao.BusinessProcessDAO;
import com.turkcell.dv.rest.dto.SensorLogDTO;
import com.turkcell.dv.service.RequestScopedContext;

@RestController
@RequestMapping(value = "/logService", headers = "Content-Type=application/json", produces = "application/json")
public class LogService {
	
	@Autowired private ActionBuffer buffer;
	@Autowired private RequestScopedContext rsc;
	@Autowired private BusinessProcessDAO businessProcessDAO;
	
	@RequestMapping(value= "/setSensorLog", method = RequestMethod.POST)
	@ResponseBody
	public String setSensorLog(@RequestBody String request) {
		Gson gson = new Gson();
		SensorLogDTO requestDTO = gson.fromJson(request, SensorLogDTO.class);
		List<Sensor> sensorList = requestDTO.getSensor();
		return "OK";
	}

	@RequestMapping(value= "/getSensorLog", method = RequestMethod.GET)
	@ResponseBody
	public String getSensorLog() {

		return null;
	}
}
